<template>
  <div  class="">

    <h1>{{mss}}</h1> 
    <button @click='addone'>addone</button>
    <button @click='minone'>minone</button>

  </div>
</template>

<script>
import store from '@/store/store'
export default {
  name: 'red',
  data(){
      return{
          mss:'我是苹果',
          pxp:5
      }
  },
  methods:{
      addone(){
        //   this.$store.commit('add',this.pxp)
        this.$store.dispatch('add',this.pxp)
      },
      minone(){
        //   this.$store.commit('reduce',this.pxp)
        this.$store.dispatch('reduce',this.pxp)
      }
  }
}
</script>

<style>

</style>
